import requests

url = 'http://photos.tuchong.com/22110/l/267900.jpg'

h = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36'
}

resp = requests.get(url, headers=h)
# resp.content
with open('./cat.jpg', 'wb') as fw:
    # 将get 请求返回来的字节串信息， 保存到文件中。
    fw.write(resp.content)


